﻿@model smartcrm.Models.FactoryStatement

@{
    ViewBag.Title = "加工商";
}

<script src="../../Scripts/factorystatement.js"></script>
<div id="dSearch" class="divSearch">
<form method="post">   
    <table>
        <tr>
            <td class="label">加工商</td>
            <td>@Html.DropDownList("sf", new SelectList(Model.DdlFactory, "ItemValue", "ItemText"))</td>
            <td class="label">起始时间</td>
            <td>
                @Html.TextBox("sb", null, new { maxlength = "50", @title="双击清空"}) ~ @Html.TextBox("se", null, new { maxlength = "50", @title = "双击清空" })
                <span class="redStar"></span>
                <input type="submit" onclick="javascript:return checkField()" id="btnSearch" value="搜索" /> 
            </td>
        </tr>
    </table>
</form>
</div>

<div id="Statement">    
    <div class="FR">
    <form action ="">
    <input type="button" value="下载对账单" id="btnExport"  /> </div>
    </form>
    <div class="list">
        <table id="tOrder">
            <thead>
                <tr>                    
                    <th style="width:65px">日期</th>
                    <th style="width:95px">订单编号</th>
                    <th style="width:80px">加工商</th>
                    <th style="width:100px">名称</th>    
                    <th style="width:80px">类别</th>                
                    <th style="width:60px">数量</th>                    
                    <th style="width:70px">金额</th>
                    <th>详细</th>
                </tr>
            </thead>
            <tbody>
            @foreach (var item in Model.Orders)
                    {
                        <tr id="@item.OrderNo">                            
                            <td>@item.TransactionDate.ToString("yyyy-MM-dd")</td>
                            <td>@Html.DisplayFor(modelItem => item.OrderNo)</td>  
                            <td>@item.FactoryName</td>
                            <td>@Html.DisplayFor(modelItem => item.OrderName)</td>  
                            <td>@Html.DisplayFor(modelItem => item.CategoryName)</td>  
                            <td>@item.Number</td>                              
                            <td>@item.FactoryAmount</td>   
                            <td>                             
                                @Html.DisplayFor(modelItem => item.DetailText)
                            </td>   
                        </tr>
                    }
                    <tr class="totalTd">
                    <td>总计：</td>      
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td class="oderAmountTotal">@Model.TotalAmount</td> 
                    <td></td>                  
                    </tr>
            </tbody>
        </table>
    </div>
</div>


